package com.gao.service.order;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gao.repo.entity.TOrder;
import com.gao.repo.mapper.TOrderMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 订单表 服务实现类
 * </p>
 *
 * @author GFH
 * @since 2021-12-05
 */
@Service
public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> implements ITOrderService {

    @Autowired
    private TOrderMapper orderMapper;

    @Override
    public List<TOrder> getByIds(List<Long> ids) {
        LambdaQueryWrapper<TOrder> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.in(TOrder::getOrderId,ids);
        List<TOrder> tOrders = orderMapper.selectList(queryWrapper);
        return tOrders;
    }
}
